/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Dao;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;


/**
 *
 * @author Programador
 */
public class bd {
    public bd(){
    }
    public Connection getConnectionSQL()
    {

    String usuario ="sa";
    String clave="1234";
    String url="jdbc:sqlserver://UTLAB706\\MSSQLSERVER2;databaseName=Escuela";
    Connection c = null;
            //driver
            //coneccion
            //enviar senentacias sql
            //procesarlos
    try {
            DriverManager.registerDriver(new com.microsoft.sqlserver.jdbc.SQLServerDriver());
            c= DriverManager.getConnection(url, usuario, clave);

        } catch (SQLException ex) {
            Logger.getLogger(bd.class.getName()).log(Level.SEVERE, null, ex);
        }



     return c;


    }

}
